package icu.guodapeng.website.controller

import org.springframework.core.env.Environment
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.PathVariable
import org.springframework.web.bind.annotation.RestController
import javax.annotation.Resource

@RestController
class EchoController {
    @Resource
    private lateinit var env: Environment

    @GetMapping("/echo/{param}")
    fun echo(@PathVariable param: String) = "Website service: $param. mark: ${env.getProperty("mark")}"

    @GetMapping("/hello")
    fun hello() = "Hello World!"
}
